<ul class="pl-15">
  <!--文件关闭的时候-->
  <li>
    <div class="item" [ngClass]="{'active': curChecked == data.title}"
         (dblclick)="data.expanded = !data.expanded">
      <i class="anticon anticon-caret-right" *ngIf="data.type === 1 && !data.expanded"
         (click)="data.expanded = true"></i>
      <i class="anticon anticon-caret-down" *ngIf="data.type === 1 && data.expanded"
         (click)="data.expanded = false"></i>
      <i class="anticon anticon-folder" *ngIf="data.type === 1 && !data.expanded"></i>
      <i class="anticon anticon-folder-open" *ngIf="data.type === 1 && data.expanded"></i>
      <i class="anticon anticon-file-text" *ngIf="data.type === 2"></i>
      <i class="anticon anticon-file-pdf" *ngIf="data.type === 3"></i>
      <span>{{data.title}}</span>
    </div>
    <ng-container *ngIf="data.expanded && data.children?.length > 0">
      <ul>
        <li class="pl-15" *ngFor="let item of data.children">
          <div class="item" [ngClass]="{'active': curChecked == item.title}" (dblclick)="changeCheckedFile(item)">
            <i class="anticon anticon-caret-right" *ngIf="item.type === 1 && !item.expanded"
               (click)="item.expanded = true"></i>
            <i class="anticon anticon-caret-down" *ngIf="item.type === 1 && item.expanded"
               (click)="item.expanded = false"></i>
            <i class="anticon anticon-folder" *ngIf="item.type === 1 && !item.expanded"></i>
            <i class="anticon anticon-folder-open" *ngIf="item.type === 1 && item.expanded"></i>
            <i class="anticon anticon-file-text" *ngIf="item.type === 2"></i>
            <i class="anticon anticon-file-pdf" *ngIf="item.type === 3"></i>
            <span>{{item.title}}</span>
          </div>
        </li>
      </ul>
    </ng-container>
  </li>
</ul>
